package com.youhome.service.service;


import com.github.pagehelper.PageInfo;
import com.youhome.common.exception.CustomException;
import com.youhome.service.model.*;
import com.youhome.service.parameter.ParamHouseMapSearch;
import com.youhome.service.parameter.ParamHouseSearch;
import com.youhome.service.response.AssociateResult;
import com.youhome.service.response.InterestPointResult;

import java.util.List;

/**
 * Created by chen365 on 2018/07/20.
 */
public interface SolrService {
    List<InterestPointResult> selectPoiByCoordinateAndDist(Double lat, Double lng, Double dist);

    List<InterestPointResult> selectPoiByCoordinateAndDist(String polygon, Integer dist);

    List<AssociateZip> associateSearchByZip(String zip);

    List<AssociateCity> associateSearchByCity(String city);

    List<AssociateAddress> associateSearchByAddress(String address);

    PageInfo<ListHubList> searchByZipOfApi(String zip,Integer pageNumber,Integer pageSize) throws CustomException;

    PageInfo<ListHubList> searchByBean(String action, String keyword, Integer pageNumber,
                                       Integer pageSize, String type, Integer beds, Integer baths,
                                       Integer year,
                                       Double minSize, Double maxSize, Double minPrice, Double maxPrice,

                                       String filed, String direction, Boolean isStar,
                                       Boolean isCheck, Double minX, Double maxX, Double minY, Double maxY, Long companyId, Boolean isNewHouse, String listingStatus);

    List<HouseMap> searchMapByBean(String action, String keyword, String type, Integer beds, Integer baths,
                                   Integer year,
                                   Double minSize, Double maxSize, Double minPrice, Double maxPrice,

                                   String filed, String direction, Boolean isStar,
                                   Boolean isCheck, Double minX, Double maxX, Double minY, Double maxY, Long companyId);

    List<HouseMapShort> searchMapShortByBean(String action, String keyword, String type, Integer beds, Integer baths,
                                             Integer year,
                                             Double minSize, Double maxSize, Double minPrice, Double maxPrice,

                                             String filed, String direction, Boolean isStar,
                                             Boolean isCheck, Double minX, Double maxX, Double minY, Double maxY, Long companyId);

    int deleteHouseIndex(String houseId);

    int saveHouseIndex(String houseId);
    int saveHouseIndex(ListHub record);

    PageInfo<ListHubList> searchByDTOSearch(ParamHouseSearch record) throws CustomException;

    Object associateSearch(String action, String keyword)throws CustomException;

    List<HouseMapShort> searchMapShortByBean(ParamHouseMapSearch record)throws CustomException;

    List<HouseMap> searchMapByBean(ParamHouseMapSearch record)throws CustomException;

    AssociateResult associateSearch(String keyword)throws CustomException;

    PageInfo<ListHubList> searchByBean(ParamHouseSearch record)throws CustomException;

    List<InterestPointResult> selectPoiByCoordinateAndDist(Double lat, Double lng, Double distance, Integer count);
}
